object frmStocktaking: TfrmStocktaking
  Left = 0
  Top = 0
  BorderStyle = bsNone
  Caption = 'Stocktaking'
  ClientHeight = 529
  ClientWidth = 866
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object pnltop: TRzPanel
    Left = 0
    Top = 0
    Width = 866
    Height = 99
    Align = alTop
    TabOrder = 0
    DesignSize = (
      864
      97)
    object lbl1: TLabel
      Left = 40
      Top = 39
      Width = 28
      Height = 13
      Caption = #24215#38138':'
    end
    object lbl2: TLabel
      Left = 204
      Top = 16
      Width = 94
      Height = 33
      Caption = #24635#24211#23384':'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -27
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object lbl3: TLabel
      Left = 527
      Top = 16
      Width = 122
      Height = 33
      Anchors = [akTop, akRight]
      Caption = #30424#28857#25968#37327':'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -27
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ExplicitLeft = 480
    end
    object lblSTNO: TLabel
      Left = 16
      Top = 12
      Width = 52
      Height = 13
      Caption = #30424#28857#32534#21495':'
    end
    object edtbeforeTotal: TRzDBNumericEdit
      Left = 304
      Top = 9
      Width = 170
      Height = 47
      DataSource = dshd
      DataField = 'beforeTotal'
      ReadOnly = True
      Alignment = taLeftJustify
      Color = clInfoBk
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGreen
      Font.Height = -32
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 0
      DisplayFormat = ',0;(,0)'
    end
    object edtSTNO: TRzEdit
      Left = 70
      Top = 8
      Width = 121
      Height = 21
      Color = clInfoBk
      ReadOnly = True
      TabOrder = 1
    end
    object edtStoreCode: TRzEdit
      Left = 70
      Top = 35
      Width = 121
      Height = 21
      Color = clInfoBk
      ReadOnly = True
      TabOrder = 2
    end
    object edtTotal: TRzDBNumericEdit
      Left = 655
      Top = 9
      Width = 193
      Height = 47
      DataSource = dshd
      DataField = 'total'
      ReadOnly = True
      Alignment = taLeftJustify
      Anchors = [akTop, akRight]
      Color = clInfoBk
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clRed
      Font.Height = -32
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 3
      DisplayFormat = ',0;(,0)'
    end
    object btnCompare: TButton
      Left = 70
      Top = 62
      Width = 121
      Height = 25
      Caption = #23545#27604#25968#25454'...'
      TabOrder = 4
      OnClick = btnCompareClick
    end
    object btnExit: TButton
      Left = 807
      Top = 62
      Width = 41
      Height = 25
      Anchors = [akTop, akRight]
      Caption = 'Exit'
      TabOrder = 5
      OnClick = btnExitClick
    end
    object btnUpdateStore: TButton
      Left = 304
      Top = 62
      Width = 170
      Height = 25
      Caption = #26356#26032#24211#23384
      TabOrder = 6
      OnClick = btnUpdateStoreClick
    end
    object btnExportExcel: TButton
      Left = 655
      Top = 62
      Width = 75
      Height = 25
      Anchors = [akTop, akRight]
      Caption = 'Export Excel'
      TabOrder = 7
      OnClick = btnExportExcelClick
    end
    object btnReport: TButton
      Left = 527
      Top = 62
      Width = 75
      Height = 25
      Anchors = [akTop, akRight]
      Caption = #30424#28857#25253#34920
      TabOrder = 8
      OnClick = btnReportClick
    end
  end
  object pnl1: TRzPanel
    Left = 0
    Top = 99
    Width = 866
    Height = 40
    Align = alTop
    TabOrder = 1
    DesignSize = (
      864
      38)
    object lbl4: TLabel
      Left = 36
      Top = 13
      Width = 28
      Height = 13
      Caption = #36135#26550':'
    end
    object lblCode: TRzLabel
      Left = 212
      Top = 13
      Width = 82
      Height = 13
      Caption = 'BarCode or Code'
    end
    object cbbPosInfo: TRzComboBox
      Left = 70
      Top = 9
      Width = 121
      Height = 21
      Style = csDropDownList
      ItemHeight = 13
      TabOrder = 0
      OnChange = cbbPosInfoChange
      Items.Strings = (
        #36135#26550'A'
        #36135#26550'B'
        #36135#26550'C'
        #36135#26550'D'
        #36135#26550'E'
        #36135#26550'F'
        #36135#26550'G'
        #36135#26550'H'
        #36135#26550'I'
        #36135#26550'J'
        #36135#26550'K'
        #36135#26550'L'
        #36135#26550'M'
        #36135#26550'N'
        #36135#26550'O'
        #36135#26550'P'
        #36135#26550'Q'
        #36135#26550'R'
        #36135#26550'S'
        #36135#26550'T'
        #36135#26550'U'
        #36135#26550'V'
        #36135#26550'W'
        #36135#26550'X'
        #36135#26550'Y'
        #36135#26550'Z')
      Values.Strings = (
        'A'
        'B'
        'C'
        'D'
        'E'
        'F'
        'G'
        'H'
        'I'
        'J'
        'K'
        'L'
        'M'
        'N'
        'O'
        'P'
        'Q'
        'R'
        'S'
        'T'
        'U'
        'V'
        'W'
        'X'
        'Y'
        'Z')
    end
    object edtCode: TRzEdit
      Left = 304
      Top = 9
      Width = 170
      Height = 21
      TabOrder = 1
      OnKeyPress = edtCodeKeyPress
    end
    object btnReStocktaking: TButton
      Left = 783
      Top = 6
      Width = 75
      Height = 25
      Anchors = [akTop, akRight]
      Caption = #37325#30424#27492#36135#26550
      TabOrder = 2
      OnClick = btnReStocktakingClick
    end
  end
  object dbgrddt: TDBGridEh
    Left = 0
    Top = 139
    Width = 866
    Height = 333
    Align = alClient
    DataGrouping.GroupLevels = <>
    DataSource = dsdt
    Flat = False
    FooterColor = clWindow
    FooterFont.Charset = DEFAULT_CHARSET
    FooterFont.Color = clWindowText
    FooterFont.Height = -11
    FooterFont.Name = 'Tahoma'
    FooterFont.Style = []
    FooterRowCount = 1
    IndicatorOptions = [gioShowRowIndicatorEh]
    PopupMenu = pm1
    ReadOnly = True
    SumList.Active = True
    TabOrder = 2
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
    Columns = <
      item
        EditButtons = <>
        FieldName = 'qty'
        Footer.FieldName = 'qty'
        Footer.ValueType = fvtSum
        Footers = <>
        Width = 28
      end
      item
        EditButtons = <>
        FieldName = 'barcode'
        Footer.FieldName = 'barcode'
        Footer.ValueType = fvtCount
        Footers = <>
        Width = 78
      end
      item
        EditButtons = <>
        FieldName = 'Description'
        Footers = <>
        Width = 283
      end
      item
        EditButtons = <>
        FieldName = 'code'
        Footers = <>
        Width = 152
      end
      item
        EditButtons = <>
        FieldName = 'brand'
        Footers = <>
        Width = 100
      end
      item
        EditButtons = <>
        FieldName = 'size'
        Footers = <>
        Width = 69
      end
      item
        EditButtons = <>
        FieldName = 'style'
        Footers = <>
        Width = 80
      end
      item
        EditButtons = <>
        FieldName = 'color'
        Footers = <>
      end
      item
        EditButtons = <>
        FieldName = 'othercode'
        Footers = <>
        Width = 131
      end
      item
        EditButtons = <>
        FieldName = 'name'
        Footers = <>
        Width = 193
      end>
    object RowDetailData: TRowDetailPanelControlEh
    end
  end
  object rzpnlshowQty: TRzPanel
    Left = 0
    Top = 472
    Width = 866
    Height = 57
    Align = alBottom
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -21
    Font.Name = 'Tahoma'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 3
    object lblxBarcode: TLabel
      Left = 16
      Top = 12
      Width = 85
      Height = 25
      Caption = 'Barcode'
      Layout = tlCenter
    end
    object lbl5: TLabel
      Left = 469
      Top = 12
      Width = 44
      Height = 25
      Caption = #24211#23384
      Layout = tlCenter
    end
    object lbl6: TLabel
      Left = 271
      Top = 12
      Width = 44
      Height = 25
      Caption = #24050#30424
      Layout = tlCenter
    end
    object lbl7: TLabel
      Left = 672
      Top = 12
      Width = 44
      Height = 25
      Caption = #24046#24322
      Layout = tlCenter
    end
    object edtex: TRzEdit
      Left = 722
      Top = 14
      Width = 121
      Height = 33
      Color = clInfoBk
      ReadOnly = True
      TabOrder = 0
    end
    object edtbarcode: TRzEdit
      Left = 107
      Top = 14
      Width = 150
      Height = 33
      Color = clInfoBk
      ReadOnly = True
      TabOrder = 1
    end
    object edtqty: TRzEdit
      Left = 321
      Top = 14
      Width = 121
      Height = 33
      Color = clInfoBk
      ReadOnly = True
      TabOrder = 2
    end
    object edttotalqty: TRzEdit
      Left = 520
      Top = 14
      Width = 121
      Height = 33
      Color = clInfoBk
      ReadOnly = True
      TabOrder = 3
    end
  end
  object myqryHD: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO stocktakinghd'
      
        '  (id, beforeTotal, total, storeCode, STNO, isOK, createDate, is' +
        'Delete)'
      'VALUES'
      
        '  (:id, :beforeTotal, :total, :storeCode, :STNO, :isOK, :createD' +
        'ate, :isDelete)')
    SQLDelete.Strings = (
      'DELETE FROM stocktakinghd'
      'WHERE'
      '  id = :Old_id')
    SQLUpdate.Strings = (
      'UPDATE stocktakinghd'
      'SET'
      
        '  id = :id, beforeTotal = :beforeTotal, total = :total, storeCod' +
        'e = :storeCode, STNO = :STNO, isOK = :isOK, createDate = :create' +
        'Date, isDelete = :isDelete'
      'WHERE'
      '  id = :Old_id')
    SQLRefresh.Strings = (
      
        'SELECT id, beforeTotal, total, storeCode, STNO, isOK, createDate' +
        ', isDelete FROM stocktakinghd'
      'WHERE'
      '  id = :id')
    SQLLock.Strings = (
      'SELECT * FROM stocktakinghd'
      'WHERE'
      '  id = :Old_id'
      'FOR UPDATE')
    Connection = DMMySQL.conMySQL
    SQL.Strings = (
      'select * from stocktakinghd')
    Left = 360
    Top = 16
    object myqryHDid: TLargeintField
      FieldName = 'id'
    end
    object myqryHDbeforeTotal: TFloatField
      FieldName = 'beforeTotal'
    end
    object myqryHDtotal: TFloatField
      FieldName = 'total'
    end
    object myqryHDstoreCode: TWideStringField
      FieldName = 'storeCode'
      Size = 10
    end
    object myqryHDSTNO: TWideStringField
      FieldName = 'STNO'
    end
    object myqryHDisOK: TBooleanField
      FieldName = 'isOK'
    end
    object myqryHDcreateDate: TDateTimeField
      FieldName = 'createDate'
    end
    object myqryHDisDelete: TBooleanField
      FieldName = 'isDelete'
    end
  end
  object dshd: TDataSource
    DataSet = myqryHD
    Left = 416
    Top = 16
  end
  object myqrydt: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO stocktakingdt'
      '  (id, hdid, goodsid, posId, qty)'
      'VALUES'
      '  (:id, :hdid, :goodsid, :posId, :qty)')
    SQLDelete.Strings = (
      'DELETE FROM stocktakingdt'
      'WHERE'
      '  id = :Old_id')
    SQLUpdate.Strings = (
      'UPDATE stocktakingdt'
      'SET'
      
        '  id = :id, hdid = :hdid, goodsid = :goodsid, posId = :posId, qt' +
        'y = :qty'
      'WHERE'
      '  id = :Old_id')
    SQLRefresh.Strings = (
      'SELECT id, hdid, goodsid, posId, qty FROM stocktakingdt'
      'WHERE'
      '  id = :id')
    SQLLock.Strings = (
      'SELECT * FROM stocktakingdt'
      'WHERE'
      '  id = :Old_id'
      'FOR UPDATE')
    Connection = DMMySQL.conMySQL
    SQL.Strings = (
      
        'select st.*,gi.barcode,gi.code,gi.name,gi.brand,gi.size,gi.style' +
        ',gi.color,gi.othercode,gi.Description '
      
        ' from stocktakingdt st left join goodsInfo gi on st.goodsID= gi.' +
        'id where posId = :posId and hdid = :hdid')
    AfterPost = myqrydtAfterPost
    AfterScroll = myqrydtAfterScroll
    AfterRefresh = myqrydtAfterRefresh
    Left = 480
    Top = 376
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'posId'
      end
      item
        DataType = ftUnknown
        Name = 'hdid'
      end>
    object myqrydtid: TLargeintField
      FieldName = 'id'
    end
    object myqrydthdid: TLargeintField
      FieldName = 'hdid'
    end
    object myqrydtgoodsid: TLargeintField
      FieldName = 'goodsid'
    end
    object myqrydtposId: TWideStringField
      FieldName = 'posId'
      Size = 10
    end
    object myqrydtqty: TFloatField
      FieldName = 'qty'
    end
    object myqrydtbarcode: TWideStringField
      FieldName = 'barcode'
    end
    object myqrydtcode: TWideStringField
      FieldName = 'code'
      Size = 50
    end
    object myqrydtname: TWideStringField
      FieldName = 'name'
      Size = 50
    end
    object myqrydtbrand: TWideStringField
      FieldName = 'brand'
    end
    object myqrydtsize: TWideStringField
      FieldName = 'size'
      Size = 15
    end
    object myqrydtstyle: TWideStringField
      FieldName = 'style'
    end
    object myqrydtcolor: TWideStringField
      FieldName = 'color'
      Size = 10
    end
    object myqrydtothercode: TWideStringField
      FieldName = 'othercode'
      Size = 100
    end
    object myqrydtDescription: TWideStringField
      FieldName = 'Description'
      Size = 255
    end
  end
  object dsdt: TDataSource
    DataSet = myqrydt
    Left = 544
    Top = 376
  end
  object pm1: TPopupMenu
    Left = 344
    Top = 272
    object N1: TMenuItem
      Caption = #21024#38500
      OnClick = N1Click
    end
  end
  object myqryQty: TMyQuery
    Connection = DMMySQL.conMySQL
    SQL.Strings = (
      
        'select barcode, (select IFNULL(sum(qty),0) from storegoodsinfo s' +
        'gi where sgi.goodsid=gi.id and sgi.storecode=:storecode )qty,'
      
        '(select IFNULL(sum(qty),0) totalqty  from  stocktakingdt stdt wh' +
        'ere stdt.hdid = :hdid  and stdt.goodsid=gi.id ) totalqty   '
      ' from goodsinfo  gi '
      'where barcode=:barcode')
    Left = 216
    Top = 360
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'storecode'
      end
      item
        DataType = ftUnknown
        Name = 'hdid'
      end
      item
        DataType = ftUnknown
        Name = 'barcode'
      end>
  end
  object frxrprt1: TfrxReport
    Version = '4.9.21'
    DotMatrixReport = False
    IniFile = '\Software\Fast Reports'
    PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
    PreviewOptions.Zoom = 1.000000000000000000
    PrintOptions.Printer = #39044#35774
    PrintOptions.PrintOnSheet = 0
    ReportOptions.CreateDate = 41727.643483090300000000
    ReportOptions.LastChange = 41727.827181539400000000
    ScriptLanguage = 'PascalScript'
    ScriptText.Strings = (
      'begin'
      ''
      'end.')
    Left = 224
    Top = 216
    Datasets = <
      item
        DataSet = frxdsdt
        DataSetName = 'stocktakingdt'
      end
      item
        DataSet = frxdshd
        DataSetName = 'stocktakinghd'
      end>
    Variables = <>
    Style = <>
    object Data: TfrxDataPage
      Height = 1000.000000000000000000
      Width = 1000.000000000000000000
    end
    object Page1: TfrxReportPage
      PaperWidth = 210.000000000000000000
      PaperHeight = 297.000000000000000000
      PaperSize = 9
      LeftMargin = 10.000000000000000000
      RightMargin = 10.000000000000000000
      TopMargin = 10.000000000000000000
      BottomMargin = 10.000000000000000000
      object ReportTitle1: TfrxReportTitle
        Height = 71.811070000000000000
        Top = 18.897650000000000000
        Width = 718.110700000000000000
        object Memo1: TfrxMemoView
          Width = 718.110700000000000000
          Height = 30.236240000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -13
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          HAlign = haCenter
          Memo.UTF8 = (
            'BOND MIX '#37929#27196#20579#37814#12520#12291)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo2: TfrxMemoView
          Top = 30.236240000000000000
          Width = 71.811070000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          HAlign = haRight
          Memo.UTF8 = (
            '')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo3: TfrxMemoView
          Top = 49.133890000000000000
          Width = 71.811070000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          HAlign = haRight
          Memo.UTF8 = (
            '')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo4: TfrxMemoView
          Left = 71.811070000000000000
          Top = 30.236240000000000000
          Width = 177.637910000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          Memo.UTF8 = (
            '[stocktakinghd."STNO"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo6: TfrxMemoView
          Left = 510.236550000000000000
          Top = 30.236240000000000000
          Width = 94.488250000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          HAlign = haRight
          Memo.UTF8 = (
            #37929#27196#20579#37804#32472#26271#38322#24549#32048)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo7: TfrxMemoView
          Left = 249.448980000000000000
          Top = 49.133890000000000000
          Width = 117.165430000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          HAlign = haRight
          Memo.UTF8 = (
            #29840#1092#28774#37721#20964#32048)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo5: TfrxMemoView
          Left = 604.724800000000000000
          Top = 49.133890000000000000
          Width = 113.385900000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          Memo.UTF8 = (
            '[stocktakinghd."pos_Qty"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo8: TfrxMemoView
          Left = 366.614410000000000000
          Top = 49.133890000000000000
          Width = 143.622140000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          Memo.UTF8 = (
            '[stocktakinghd."POS_INFO"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo9: TfrxMemoView
          Left = 249.448980000000000000
          Top = 30.236240000000000000
          Width = 117.165430000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          HAlign = haRight
          Memo.UTF8 = (
            #37929#27196#20579#37715#23942#8364#32472#26271#38322#24549#32048)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo10: TfrxMemoView
          Left = 510.236550000000000000
          Top = 49.133890000000000000
          Width = 94.488250000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          HAlign = haRight
          Memo.UTF8 = (
            #29840#1092#28774#37804#32472#26271#38322#24549#32048)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo11: TfrxMemoView
          Left = 366.614410000000000000
          Top = 30.236240000000000000
          Width = 143.622140000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          Memo.UTF8 = (
            '[stocktakinghd."BEFORE_TOTAL"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo12: TfrxMemoView
          Left = 604.724800000000000000
          Top = 30.236240000000000000
          Width = 113.385900000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          Memo.UTF8 = (
            '[stocktakinghd."TOTAL"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo24: TfrxMemoView
          Left = 71.811070000000000000
          Top = 49.133890000000000000
          Width = 177.637910000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          Memo.UTF8 = (
            '[stocktakinghd."STORE_CODE"]')
          ParentFont = False
          VAlign = vaCenter
        end
      end
      object Header1: TfrxHeader
        Height = 22.677180000000000000
        Top = 151.181200000000000000
        Width = 718.110700000000000000
        object Memo17: TfrxMemoView
          Top = 3.779530000000000000
          Width = 30.236240000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            #29840#1092#28774)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo18: TfrxMemoView
          Left = 30.236240000000000000
          Top = 3.779530000000000000
          Width = 30.236240000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            #37825#20276#22138)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo19: TfrxMemoView
          Left = 60.472480000000000000
          Top = 3.779530000000000000
          Width = 56.692950000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            'Barcode')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo20: TfrxMemoView
          Left = 117.165430000000000000
          Top = 3.779530000000000000
          Width = 294.803340000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            #37819#24538#22570)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo21: TfrxMemoView
          Left = 411.968770000000000000
          Top = 3.779530000000000000
          Width = 94.488250000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            #37725#20346#22685)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo22: TfrxMemoView
          Left = 506.457020000000000000
          Top = 3.779530000000000000
          Width = 132.283550000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            #23046#24807#32033)
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo23: TfrxMemoView
          Left = 638.740570000000000000
          Top = 3.779530000000000000
          Width = 79.370130000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            #26864#28358#22730)
          ParentFont = False
          VAlign = vaCenter
        end
      end
      object MasterData1: TfrxMasterData
        Height = 18.897650000000000000
        Top = 196.535560000000000000
        Width = 718.110700000000000000
        DataSet = frxdsdt
        DataSetName = 'stocktakingdt'
        RowCount = 0
        object stocktakingdtposid: TfrxMemoView
          Width = 30.236240000000000000
          Height = 18.897650000000000000
          ShowHint = False
          DataField = 'posid'
          DataSet = frxdsdt
          DataSetName = 'stocktakingdt'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = []
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '[stocktakingdt."posid"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object stocktakingdtQTY: TfrxMemoView
          Left = 30.236240000000000000
          Width = 30.236240000000000000
          Height = 18.897650000000000000
          ShowHint = False
          DataField = 'QTY'
          DataSet = frxdsdt
          DataSetName = 'stocktakingdt'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = []
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '[stocktakingdt."QTY"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object stocktakingdtbarcode: TfrxMemoView
          Left = 60.472480000000000000
          Width = 56.692950000000000000
          Height = 18.897650000000000000
          ShowHint = False
          DataField = 'barcode'
          DataSet = frxdsdt
          DataSetName = 'stocktakingdt'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = []
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '[stocktakingdt."barcode"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object stocktakingdtDescription: TfrxMemoView
          Left = 117.165430000000000000
          Width = 294.803340000000000000
          Height = 18.897650000000000000
          ShowHint = False
          DataField = 'Description'
          DataSet = frxdsdt
          DataSetName = 'stocktakingdt'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = []
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '[stocktakingdt."Description"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object stocktakingdtbrand: TfrxMemoView
          Left = 411.968770000000000000
          Width = 94.488250000000000000
          Height = 18.897650000000000000
          ShowHint = False
          DataField = 'brand'
          DataSet = frxdsdt
          DataSetName = 'stocktakingdt'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = []
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '[stocktakingdt."brand"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object stocktakingdtstyle: TfrxMemoView
          Left = 506.457020000000000000
          Width = 132.283550000000000000
          Height = 18.897650000000000000
          ShowHint = False
          DataField = 'style'
          DataSet = frxdsdt
          DataSetName = 'stocktakingdt'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = []
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '[stocktakingdt."style"]')
          ParentFont = False
          VAlign = vaCenter
        end
        object stocktakingdtcolor: TfrxMemoView
          Left = 638.740570000000000000
          Width = 79.370130000000000000
          Height = 18.897650000000000000
          ShowHint = False
          DataField = 'color'
          DataSet = frxdsdt
          DataSetName = 'stocktakingdt'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = []
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '[stocktakingdt."color"]')
          ParentFont = False
          VAlign = vaCenter
        end
      end
      object PageFooter1: TfrxPageFooter
        Height = 79.370130000000000000
        Top = 275.905690000000000000
        Width = 718.110700000000000000
        object Memo13: TfrxMemoView
          Top = 56.692950000000000000
          Width = 718.110700000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = 'Arial'
          Font.Style = [fsBold]
          HAlign = haCenter
          Memo.UTF8 = (
            '[Page#]/[TotalPages#]')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo14: TfrxMemoView
          Top = 3.779530000000000000
          Width = 230.551330000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo15: TfrxMemoView
          Left = 514.016080000000000000
          Top = 3.779530000000000000
          Width = 204.094620000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '')
          ParentFont = False
          VAlign = vaCenter
        end
        object Memo16: TfrxMemoView
          Left = 260.787570000000000000
          Top = 3.779530000000000000
          Width = 222.992270000000000000
          Height = 18.897650000000000000
          ShowHint = False
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clBlack
          Font.Height = -12
          Font.Name = #26032#23435#20307
          Font.Style = [fsBold]
          Frame.Typ = [ftBottom]
          Memo.UTF8 = (
            '')
          ParentFont = False
          VAlign = vaCenter
        end
      end
    end
  end
  object frxdshd: TfrxUserDataSet
    UserName = 'stocktakinghd'
    OnCheckEOF = frxdshdCheckEOF
    OnFirst = frxdshdFirst
    OnNext = frxdshdNext
    Fields.Strings = (
      'STNO'
      'BEFORE_TOTAL'
      'TOTAL'
      'STORE_CODE'
      'POS_INFO'
      'pos_Qty')
    OnGetValue = frxdshdGetValue
    Left = 296
    Top = 216
  end
  object frxdsdt: TfrxUserDataSet
    UserName = 'stocktakingdt'
    OnCheckEOF = frxdsdtCheckEOF
    OnFirst = frxdsdtFirst
    OnNext = frxdsdtNext
    OnPrior = frxdsdtPrior
    Fields.Strings = (
      'posid'
      'QTY'
      'barcode'
      'code'
      'Description'
      'name'
      'brand'
      'size'
      'style'
      'color')
    OnGetValue = frxdsdtGetValue
    Left = 352
    Top = 216
  end
  object myqryRPDT: TMyQuery
    SQLInsert.Strings = (
      'INSERT INTO stocktakingdt'
      '  (id, hdid, goodsid, posId, qty)'
      'VALUES'
      '  (:id, :hdid, :goodsid, :posId, :qty)')
    SQLDelete.Strings = (
      'DELETE FROM stocktakingdt'
      'WHERE'
      '  id = :Old_id')
    SQLUpdate.Strings = (
      'UPDATE stocktakingdt'
      'SET'
      
        '  id = :id, hdid = :hdid, goodsid = :goodsid, posId = :posId, qt' +
        'y = :qty'
      'WHERE'
      '  id = :Old_id')
    SQLRefresh.Strings = (
      'SELECT id, hdid, goodsid, posId, qty FROM stocktakingdt'
      'WHERE'
      '  id = :id')
    SQLLock.Strings = (
      'SELECT * FROM stocktakingdt'
      'WHERE'
      '  id = :Old_id'
      'FOR UPDATE')
    Connection = DMMySQL.conMySQL
    SQL.Strings = (
      
        'select sum(st.qty) qty,st.posid,gi.barcode,gi.code,gi.name,gi.br' +
        'and,gi.size,gi.style,gi.color,gi.othercode,gi.Description '
      
        ' from stocktakingdt st left join goodsInfo gi on st.goodsID= gi.' +
        'id where posId = :posId and hdid = :hdid'
      ' group by gi.barcode')
    Left = 376
    Top = 360
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'posId'
      end
      item
        DataType = ftUnknown
        Name = 'hdid'
      end>
  end
end
